<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
//		简单封装,控制时间
		function timeOut(ms){
			return new Promise((resolved,rejected)=>{
				setTimeout(()=>{
					resolved("成功")
				},ms)
			})
		}
		timeOut(2000).then((val)=>{
			console.log(val)
		})
	</script>
</html>
